<section class="content-header">
</section>
<section class="content">
    <div ng-hide="platform_list">
        <!--表格头部 可选-->
        <div class="table-header">
            <form class="form-inline">
                <div class="form-group select2height">
                        <select class="form-control sheet-select" select2="select2NotificationType" ng-model="notificationType"
                            ng-options="notificationType.name for notificationType in notificationTypeList"
                            type="text" class="form-control"
                            ng-change="onChangeNotificationTypeSlelect(notificationType)"
                            style="width: 175px">
                            <option value="">请选择通知类型</option>
                        </select>
                    </div>
                    <div class="form-group select2height">
                        <select class="form-control sheet-select" select2="select2Emergency" ng-model="emergency"
                            ng-options="emergency.name for emergency in emergencyList"
                            type="text" class="form-control"
                            ng-change="onChangeEmergencySlelect(emergency)" name="plat_id"
                            style="width: 175px">
                            <option value="">请选择重要性</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control sheet-input"
                            ng-model="search.creator" placeholder="请输入签发人姓名或工号">
                    </div>
                    <div class="form-group">
                        <div class="form-group">
                            <input class="form-control input-small" style="background-color:#fff;width:337px;height: 26px;" sn-date-range-picker options="dateOption4" placeholder="输入签发日期" ng-model="datePicker.date" readonly />
                            <span class="icon-date" style="pointer-events: none;"> <i class="fa fa-calendar glyphicon glyphicon-calendar"></i></span>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <div class="search-div marginL" ng-click="doSearchNotification()">查询</div>
                        <div class="reset-div marginL" ng-click="doResetNotification()">重置</div>
                        
                    </div>
                    <div class="pull-left sn-table-btn-group" style="float:right !important;margin-top:3px;margin-right: 68px;">
                        <a href="javascript:void(0)" ng-href="/#/createNotification" style="vertical-align: bottom;">
                            <button class="btn btn-primary" ng-click="add_click()">添加</button>
                        </a>
                    </div>
            </form>
        </div>
        <!--表格主体 -->
        <div class="table-body">
            <table class="sn-table" style="table-layout: fixed">
                <tr>
                    <th width="10%">公文号</th>
                    <th width="10%">标题</th>
                    <th width="10%">重要性</th>
                    <th width="10%">通知类型</th>
                    <th width="10%">签发部门</th>
                    <th width="10%">签发人</th>
                    <th width="10%">签发时间</th>
                    <th width="10%">状态</th>
                    <th width="10%">是否置顶</th>
                    <th width="15%">操作</th>
                </tr>
                <tr ng-repeat="notificationDO in notificationDOListRespVO">
                    <td class="text_overflow" style="padding: 10px 20px;" title="{{notificationDO.documentNumber}}">{{notificationDO.documentNumber}}</td>
                    <td class="text_overflow" style="padding: 10px 20px;" title="{{notificationDO.title}}">{{notificationDO.title}}</td>
                    <td>
                        <div ng-if="notificationDO.emergency == 0">一般</div>
                        <div ng-if="notificationDO.emergency == 1">一般</div>
                        <div ng-if="notificationDO.emergency == 2">紧急</div>
                        <div ng-if="notificationDO.emergency == 3">非常紧急</div></td>
					<td>
						<div ng-if="notificationDO.type == 'notice'">通知</div>
						<div ng-if="notificationDO.type == 'announcement'">公告</div>
						<div ng-if="notificationDO.type == 'regulation'">规范</div>
					</td>
					<td class="text_overflow" style="padding: 10px 20px;" title="{{notificationDO.department}}">{{notificationDO.department}}</td>
                    <td class="text_overflow" title="{{notificationDO.creator}}">{{notificationDO.creator}}</td>
                    <td>{{notificationDO.createTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
                    <td ng-if="notificationDO.state==false">已关闭</td>
                    <td ng-if="notificationDO.state==true">已开启</td>
                    <td>
	                    <div class="ux-switch" style="height:24px;">
						    <label>
						        <input type="checkbox" ng-change="doStick(notificationDO.stick,notificationDO.id)" ng-model="notificationDO.stick">
						        <span class="ux-switch-inner">
						            <span class="ux-switch-on-text">ON</span>
						            <span class="ux-switch-off-text">OFF</span>
						        </span>
						    </label>
						</div>
					</td>
                    <td>
                        <a href="javascript:;" ng-href="/#/updateNotification/{{notificationDO.id}}">修改</a>
                        <a href="javascript:;" ng-click="doClose(notificationDO.id)" ng-if="notificationDO.state==true">关闭</a>
                        <a href="javascript:;" ng-click="doOpen(notificationDO.id)" ng-if="notificationDO.state==false">开启</a>
                    </td>
                </tr>
            </table>
        </div>
        <div class="table-footer">
            <!-- <div class="pull-left sn-table-btn-group">
	            <a href="javascript:void(0)" ng-href="/#/createNotification" style="vertical-align: bottom;">
	                <button class="btn btn-primary" ng-click="add_click()">添加</button>
	            </a>
            </div> -->
            <div class="pull-right sn-table-pager text-right">
	            <cd-pager page="page" page-size="pageSize" total="total"
	                page-action="paging2(page, pageSize, total)"></cd-pager>
            </div>
        </div>
    </div>
</section>